﻿using System;
using System.ComponentModel;

namespace PLCS.Application.Contracts.EquipmentApp.Dtos;

public class EquipmentEditDto : EntityDto<Guid>
{
    /// <summary>
    /// 工厂编码
    /// </summary>
    [Description("工厂编码")]
    public string? SiteNo { get; set; }

    /// <summary>
    /// 车间编码
    /// </summary>
    [Description("车间编码")]
    public string? AreaNo { get; set; }

    /// <summary>
    /// 产线编码
    /// </summary>
    [Description("产线编码")]
    public string? PdLineNo { get; set; }

    /// <summary>
    /// 设备名称
    /// </summary>
    [Description("设备名称")]
    public string EquName { get; set; }

    /// <summary>
    /// 设备名称MES
    /// </summary>
    [Description("设备名称上层")]
    public string EquName_Higher { get; set; }

    /// <summary>
    /// 设备名称PLC
    /// </summary>
    [Description("设备名称下层")]
    public string EquName_Lower { get; set; }

    /// <summary>
    /// 设备编号
    /// </summary>
    [Description("设备编号")]
    public string EquNum { get; set; }

    /// <summary>
    /// 在PLC中的序号
    /// </summary>
    [Description("写任务序号")]
    public int Plc_Index { get; set; }

    public string PLCAddress { get; set; }
    public int Rack { get; set; } = 0;
    public int Slot { get; set; } = 1;
    public int DbNumber { get; set; }

    /// <summary>
    /// 设备类型
    /// </summary>
    [Description("设备类型")]
    public EquipmentType EquType { get; set; }

    /// <summary>
    /// 包含工位
    /// </summary>
    [Description("包含工位")]
    public string? ContainStationNos { get; set; }

    /// <summary>
    /// 是否使用
    /// </summary>
    [Description("是否使用")]
    public YesNo IsUse { get; set; } = YesNo.是;

    /// <summary>
    /// 所属轨道
    /// </summary>
    public string? InTrack { get; set; }
}